//package com.netty;
//
//import io.netty.bootstrap.Bootstrap;
//import io.netty.buffer.Unpooled;
//import io.netty.channel.ChannelFuture;
//import io.netty.channel.ChannelInitializer;
//import io.netty.channel.EventLoopGroup;
//import io.netty.channel.nio.NioEventLoopGroup;
//import io.netty.channel.socket.SocketChannel;
//import io.netty.channel.socket.nio.NioSocketChannel;
//import io.netty.handler.logging.LogLevel;
//import io.netty.handler.logging.LoggingHandler;
//
///**
// * Created by Administrator on 2018/5/19/019.
// */
//public class Client {
//    public static void main(String[] args) throws InterruptedException {
//        EventLoopGroup gGroop = new NioEventLoopGroup();
//
//
//        Bootstrap b = new Bootstrap();
//        b.group(gGroop).channel(NioSocketChannel.class)
//                .handler(new LoggingHandler(LogLevel.INFO))
//                .handler(new ChannelInitializer<SocketChannel>() {
//                    @Override
//                    protected void initChannel(SocketChannel sc) throws Exception {
//                        sc.pipeline().addLast(new ClientHander());
//                    }
//                });
//
//        ChannelFuture cf = b.connect("127.0.0.1", 8888).sync();
//        cf.channel().writeAndFlush(Unpooled.copiedBuffer("hello Server1".getBytes()));
//        cf.channel().closeFuture().sync();
//        gGroop.shutdownGracefully();
//    }
//
//}
